The present invention relates to apparatus and method for controlling a conveyance of a medium of a library apparatus in which a number of memory media such as magnetic tape cartridges or the like are enclosed and which records and reproduces them and, more particularly, to apparatus and method for controlling a data transfer between a library apparatus and a host computer.
In recent computer systems, in association with an increase in number of media such as magnetic tapes, optical disks, or the like as external memory media, improving a use efficiency, maintenance performance, further, a reliability, and the like is important. For these purposes, a library apparatus to automatically execute the storage of the media and the conveyance to the recording/reproducing unit by using a robot mechanism is provided. In such a library apparatus, the number of access requests per unit time increases in association with an increase in number of working jobs and an increase in number of host computers connected.
FIG. 1 is a schematic diagram of a conventional library apparatus. A library apparatus 700 is used as an information storage of upper host computers 20-1 to 20-4 and has two directors 702 as input/output control sections. The directors 702 have, for example, four channels A to D and E to H, respectively. In this case, the channels A and B and the channels E and F are used. Cell blocks 710 as medium storages each for enclosing a medium such as a magnetic tape cartridge or the like are provided in the library apparatus 700. Two accessors 708 are provided as conveying robot mechanisms which run on a rail 714 along the cell blocks 710. The accessor 708 is controlled by a machine controller 706. An accessor controller 704 is provided as an upper apparatus of the machine controller 706. Generally, one of the accessors 708 operates and executes a conveyance control and the other accessor 708 doesn't operate. This is because the two accessors 708 move on the one rail 714, they cannot operate simultaneously and a management is one-dimensionally performed by one control section so that the accessors 708 operate separately by an exclusive control method. A plurality of magnetic tape units are connected to the director 702. The director 702 loads the medium conveyed by the accessor 708 and reads or writes it and, after that, the medium is returned to the cell block 710 by the accessor 708.
In such a library apparatus, how fast the library apparatus can process the attachment (mounting) and removal(demounting) of a magnetic tape cartridge to/from a magnetic tape unit 716 is important. Namely, at the start of the reading or writing process, it is necessary to convey the designated magnetic tape cartridge from the cell block 710 as quickly as possible and to return the ejected magnetic tape cartridge to the original cell as soon as possible after the reading or writing operation is completed in order to improve the performance of the library apparatus.
The mounting and demounting processes in the conventional library apparatus occurs as follows. First, according to the mounting process, a host OS (operating system), such as a library support program provided for the host computer, generates a moving command having command data in which a cell address of the cell block 710 is set to a movement original side address (From Address) and a logical machine No. of the magnetic tape unit 716 to be used is set to a movement destination side address (To Address). The director 702 which received the moving command instructs the operation to the accessor controller 704. The magnetic tape cartridge is taken out from the cell block 710 by the accessor 708 and is conveyed to the designated magnetic tape unit 716 and is inserted into an insertion port.
When a device end is obtained by completion of the conveyance, the host OS generates a loading command, thereby loading the conveyed magnetic tape cartridge to the magnetic tape unit 716. When the device end is obtained by completion of the loading, the host OS Generates a reading or writing command, thereby performing the reading or writing operation.
When the reading or writing operation is completed, the host OS executes the demounting process. In the demounting process, first, an unloading command is generated, thereby executing the unloading operation to eject out the magnetic tape cartridge from the magnetic tape unit 716 which finished the reading or writing operation. When the unloading command is finished by the device end, the host OS Generates a moving command to return the magnetic tape cartridge to the cell block. That is, the host OS generates a moving command having command data in which the machine No. of the magnetic tape unit which finished the unloading operation is set to the movement original side address and the position of the original cell block is set to the movement destination side address. When the accessor 708 is in an idle state, the accessor 708 returns the ejected magnetic tape cartridge to the original position in the cell blocks 710 by the control of the accessor controller 704 based on the command data from the director 702. In this manner, a series of processes are finished.
The time chart of FIG. 2 shows the demounting process of a conventional library apparatus. In FIG. 2, the host OS, directors 702, magnetic tape units 716, and accessors 708 are shown in the upper lateral direction; wherein the vertical direction denotes a time base and a state of commands between the units, instructions, and a state of response between the units.
In FIG. 2, a host computer (host OS) 20 first designates the logical machine No. of the magnetic tape unit and generates an unloading command 600 to the director 702. When the director 702 normally receives the unloading command 600, the director 702 returns an initial status 602 of "00" and sets a channel end. The director 702 also gives an unloading instruction 604 to the magnetic tape unit 716 of the logical machine No. designated on the basis of the unloading command 600. The magnetic tape unit 716 which received the unloading instruction 604 rewinds the cartridge of the magnetic tape, executes the ejecting operation after completion of the rewinding, and reports a completion of the unloading 614 to the director 702. The operating time from the start of the unloading to the end thereof is equal to about 10 to 60 seconds.
On the other hand, at the time point when the director 702 gives the unloading instruction 604 to the magnetic tape unit 716, the status of a control end, a unit end, and a unit check are returned as an end status 606 for the unloading command 600 and the host computer 20 recognizes the normal end of the command generation. Subsequently, the host computer 20 executes a sensing process during the unloading operation. First, a sensing command 608 is issued and an initial status and sense data 610 of a predetermined number of bytes is returned from the director 702 as a channel end based on the command receipt. A final status 612 of the device end is subsequently returned and a state of the library apparatus is recognized. The sensing process is executed at a predetermined timer period.
The director 702 which received the completion of the unloading 614 by the end of the unloading operation of the magnetic tape unit 716 reports an attention status 616 having the logical machine No. #8 allocated to the accessor 708 to the host computer 20. The host computer 20 recognizes the unloading operation by the receipt of the attention status 616 having the logical machine No. #8 and issues a moving command 618. When the moving command 618 is normally received by the director 702, an initial status 620 of "00" is returned and the channel end is set. Subsequently, movement original side/movement destination side address data 622 is issued as command data. When the accessor 708 is empty in this instance, the director 702 gives a moving instruction 624 based on the movement original side address and the movement destination side address and the conveying operation of the accessor 708 is started. Although it depends on the cell position, the conveying operation needs about 10 seconds as an average. When a completion of the operation 628 is reported from the accessor 708 to the director 702, a final status 630 is reported to the host computer 20 and the device end indicative of the normal end of the moving command is obtained.
In such a conventional demounting process after completion of the reading or writing process, however, a special attention status is reported to the host OS at a time point when the unloading command is issued by the host OS and the operation is completed, a moving command to return the medium to the original cell is issued from the host OS in response to the attention status, and serialized processes to sequentially execute the unloading operation and the conveying operation are performed.
Due to this, only after the unloading operation was completed, does the accessor starts moving to the position of the magnet tape unit which ejected the cartridge. Therefore, at least the processing time obtained by adding the conveying time to the unloading operation time is needed until the end of the demounting process and there is a problem such that it takes an additional processing time.
As a background a storage amount of the data base is being enormously increased nowadays on the user's side, it is an indispensable condition to process the data at a high speed when the library apparatus is used, and further, the improvement of the processing performance of the library apparatus is strongly demanded by the user's needs in association with the appearance of the other competition apparatuses.
Hitherto, the magnetic tape subsystem using a library apparatus is widely used as an external memory apparatus of a computer system and stores a great amount of preservation data. Such a magnetic tape subsystem needs to process a large amount of data in a short time and a data transfer speed between the channel of the host computer and the magnetic tape subsystem is remarkably raised. In the data transfer between the channel and the magnetic tape subsystem, the data is transmitted and received each time an input/output request is generated between the channel and the magnetic tape subsystem. Therefore, by changing the transmission/reception speed of the channel or magnetic tape subsystem, the data transfer speed can be changed. In the magnetic tape subsystem, in order to efficiently store a great amount of data to a medium more efficiently, write data is compressed and stored and read data from the medium is decompressed and transferred to the host computer.
However, there is a case where the high speed data transfer cannot be normally performed due to a failure of a data transmitting and receiving circuit or the like in the magnetic tape subsystem and the failure cannot be detected. In such a case, a timer in which a constant monitoring time has been set is activated in the magnetic tape subsystem and a failure is detected by a time-out which occurs because the process is not finished within a monitoring time.
A data compressing circuit in the magnetic tape subsystem compresses a great amount of data to a smaller amount of data and preserves. Therefore, an amount of input data to the compressing circuit is large and an amount of output data is small. Thus, it is necessary to realize a high transfer speed of the input data. However, when the transfer speed rises, a load of the magnetic tape subsystem increases, so that a probability such that the margin lacks and the system enters an abnormal state rises.
Further, when the data compressing circuit is realized by a program, the processing speed becomes slow and it takes a time for a storing process to the medium. The compressing process is an algorithm having a constant regularity. Therefore, the data compressing circuit is generally realized by a hardware. However, in the data compressing circuit with a hardware construction, there is a case where a hardware failure which is peculiar to the apparatus occurs in dependence on the performance of the device or the like. In many cases, causes of such a failure depend on a state of a high load by the data transfer of a high speed. Therefore, there is also a case where when the data compressing circuit fails, by switching the data transfer speed of the magnetic tape subsystem to a low speed, the failure can be rescued. However, since the time of the data preserving process to the magnetic tape subsystem is reduced, the maximum transfer speed is generally set and the data transfer is started between the magnetic tape subsystem and the channel. When an error occurs, the data transfer speed is switched to a low speed and a retry is performed.
FIG. 3 shows a conventional data transfer control apparatus. The director 702 of a library apparatus which functions as a magnetic tape control unit is provided for a data transmission and reception control circuit 718 provided for a channel of a host computer 20. The director 702 comprises: a data transmission and reception control circuit 730; a host interface controller (HIC) 722; a multiblock buffer (MBB) 724; a control information table (CIT) 726; and a formatter (FMT) 728. The host interface controller (HIC) 722 comprises: the data transmission and reception control circuit 730; a transfer speed setting register 732; a channel data abnormality detecting circuit 734; a memory 736; a microprocessor (MPU) 738; and a data compressing circuit 740.
The host interface controller 722 executes various kinds of input and output processes with the host computer 20. The formatter 728 executes a formatting process of the read data and write data for a magnetic tape in the magnetic tape drive unit or the like. The control information table 726 is a memory to store various control information (command parameter and the like). The multiblock buffer 724 is a data buffer to temporarily store the transfer data. The data transmission and reception control circuits 718 and 730 control the transmission and reception at the time of the data transfer. The MPU 738 executes various controls in the host interface controller 722. The data compressing circuit 740 performs a compression of data to be written to the magnetic tape medium and a decompression of read data in the drive unit. The channel data abnormality detecting circuit 734 detects that an error such as a hardware failure or the like occurs when data is transferred from the channel. The memory 736 stores data such as timer, threshold value of the timer, maximum data transfer speed, and the like. The MPU 738 manages the data in the memory 736. The transfer speed setting register 732 sets the data transfer speed between the register and the channel.
A flowchart of FIG. 4 shows a transfer control by the conventional MPU 738. First, the MPU 738 sets the maximum data transfer speed into the transfer speed setting register 732 in the data transmission and reception control circuit 730 (step S1). The timer stored in the memory 736 is reset and is started (step S2). The data transfer is started (step S3). After that, the elapsed time as a value of the timer in the memory 736 is compared with the timer threshold value, thereby monitoring the time (step S4). Until the timer value exceeds the timer threshold value by the time monitor, a check is made to see if an error has been detected by the channel data abnormality detecting circuit 734 or not (step S5). Thus, when no error is detected, a normal end is reported to the host computer 20 (step S6). When the timer value exceeds the timer threshold value in the process in step S4 or when the error is detected in the process in step S5, a data transfer speed lower than the present data transfer speed is set into the transfer speed setting register 732 in the data transmission and reception control circuit 730 (step S7). An error is reported to the host computer 20, thereby instructing the retry (step S8).
A time chart of FIG. 5 shows a transfer control by the conventional MPU 738. In FIG. 5, (A) denotes a channel; (B) a magnetic tape control unit; (C) a maximum data transfer speed (4.5 Mbytes/sec); (D) a timer value (initial value=0); (E) a timer threshold value (=10); and F a value of the transfer speed setting register (initial value=4.5 Mbytes/sec).
When a data transfer request is generated from the host computer 20 at a timing t1, the MPU 738 executes a data transfer at the maximum data transfer speed of 4.5 Mbytes/sec stored in the memory 736. When the time-out is detected due to an error at a timing t2 during the data transfer process, the error is reported to the host computer 20, thereby executing the retry. Since the error has already occurred at a timing t3 at the maximum data transfer speed of 4.5 Mbytes/sec, the data transfer speed is reduced to 3.0 Mbytes/sec, thereby retrying. Since the data transfer speed is reduced, the data transfer is normally executed at a timing t4. When the data transfer is finished, the normal end is reported to the host computer 20. When a new data transfer request is subsequently generated at a timing t5, the data transfer speed is again set to 4.5 MBytes/sec as a maximum data transfer speed, thereby starting the data transfer. However, in a manner similar to the case at a timing t6, an error occurs during the data transfer and the time-out occurs. The error is reported to the host computer 20, thereby performing the retry. At a timing tT, the data transfer speed is reduced to 3.0 MBytes/sec and the retry is performed. The normal end is reported to the host computer 20 at a timing t8.
However, such a data transfer control in the conventional external memory apparatus has the following problems. First, each time a data transfer request is generated from the host computer, the maximum data transfer speed is set and the data transfer is performed. Therefore, the load on the external memory apparatus side increases, an error occurs, and a frequency of the occurrence of the retry process increases. Thus, the delay time for the data storing process which is executed by the external memory apparatus increases and an occupation time of the channel increases.
The external memory apparatus detects an error by monitoring the time by the timer. As a monitoring time in this case, it is necessary to have at least the time during which the maximum amount of data which is peculiar to the external memory apparatus can be transferred. For example, in the magnetic tape subsystem, the monitoring time which is about 90 times as long as the transfer time which is generally used is used. Therefore, although the data transfer is completed in one minute so long as the normal data transfer can be performed, if a retry of the data transfer occurs due to a failure or abnormality, a situation such that it takes a time of 90 minutes for the time-out waiting. Therefore, the data storage processing time is fairly delayed.
Among the errors of the data transmission and reception control circuit and the like of the external memory apparatus, there is a case where an error occurs because of a high data transfer speed. In such a case, the error can be rescued by setting the data transfer speed to a low speed. However, hitherto, each time the data transfer request is generated from the host computer, the maximum data transfer speed is set and the data transfer is started. Therefore, when an error occurs because the data transfer speed is too high, the error occurs each time the data transfer request is generated. Therefore, the number of retry times remarkably increases and the data storing process becomes slow.
Further, there is a case where the error at the time of the data transfer in the external memory apparatus is caused by the data pattern of the transfer data. Generally, the user of the external memory apparatus stores data patterns of the same system. Therefore, there is a case where the number of errors which occurs due to the data pattern increases in dependence on the user. In such a case, each time the data transfer request is generated, the error of the data transfer occurs, so that the number of retry times extremely increases and the data storing process becomes slow.